package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author admin
 * @since 2021-05-18
 */
public class Comment implements Serializable {

    private static final long serialVersionUID=1L;

      @TableId(value = "id", type = IdType.AUTO)
      private Long id;

    private Long blogId;

    private Long userId;

    private String userNickname;

    private LocalDateTime createTime;

    private String content;

    private Long superiorId;

    //子类
    @TableField(exist = false)
    private List<Comment> next;

    //上一级的评论的姓名
    @TableField(exist = false)
    private String parentname;

    public String getParentname() {
        return parentname;
    }

    public void setParentname(String parentname) {
        this.parentname = parentname;
    }

    public List<Comment> getNext() {
        return next;
    }

    public void setNext(List<Comment> next) {
        this.next = next;
    }

    public Long getId() {
        return id;
    }

      public void setId(Long id) {
          this.id = id;
      }
    
    public Long getBlogId() {
        return blogId;
    }

      public void setBlogId(Long blogId) {
          this.blogId = blogId;
      }
    
    public Long getUserId() {
        return userId;
    }

      public void setUserId(Long userId) {
          this.userId = userId;
      }
    
    public String getUserNickname() {
        return userNickname;
    }

      public void setUserNickname(String userNickname) {
          this.userNickname = userNickname;
      }
    
    public LocalDateTime getCreateTime() {
        return createTime;
    }

      public void setCreateTime(LocalDateTime createTime) {
          this.createTime = createTime;
      }
    
    public String getContent() {
        return content;
    }

      public void setContent(String content) {
          this.content = content;
      }
    
    public Long getSuperiorId() {
        return superiorId;
    }

      public void setSuperiorId(Long superiorId) {
          this.superiorId = superiorId;
      }

    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", blogId=" + blogId +
                ", userId=" + userId +
                ", userNickname='" + userNickname + '\'' +
                ", createTime=" + createTime +
                ", content='" + content + '\'' +
                ", superiorId=" + superiorId +
                ", next=" + next +
                ", parentname='" + parentname + '\'' +
                '}';
    }
}
